Repository navigation
fix(mcp): return JSON attachments as text - #2412
Open
cast-vytautas wants to merge 1 commit into
Open
cast-vytautas wants to merge 1 commit into
cast-vytautas wants to merge 1 commit into
Conversation
Treat application/json and application/jsonl as text to avoid embedded-resource validation failures. Cover exact payload decoding, protocol validity, and binary preservation (LLM-4380). Co-Authored-By: Kimchi <noreply@kimchi.dev>
|
@cast-vytautas is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Return
application/jsonandapplication/jsonlevent attachments through the existing text-decoding path instead of wrapping them as embedded-resource blobs. The resulting text block preserves the JSON payload inside the handler's existing header and Markdown fence.text/plain, images, and genericapplication/octet-streambehavior is unchanged. This PR does not deploy the service or alter the separate gateway adapter.Evidence
invalid_unionundercontent[0].After: the handler emits one text part containing the exact UTF-8 attachment payload, with no resource or image part.
mcp-coretests passed.Merge Danger
Door: Two-way. Reverting restores the previous attachment response behavior without a data migration.
Blast Radius: Only
get_event_attachmentresponses for JSON and JSONL MIME types. Other MIME types keep their existing branches. The live service needs a separate deployment after merge.